Test Double Patterns
Recent Changes
Test Double | Category: Test Double Patterns | 18 February 2007 |
We replace a component on which the SUT depends with a "test-specific
equivalent." |
Hard-Coded Test Double | Category: Test Double Patterns | 18 February 2007 |
Build the Test Double by hard-coding the return values and/or expected
calls. |
Test Spy | Category: Test Double Patterns | 4 February 2007 |
Use a Test Double to capture the indirect output calls made to
another component by the SUT for later verification by the test. |
Test-Specific Subclass | Category: Test Double Patterns | 4 February 2007 |
Add methods that expose the state or behavior needed by the test to a
subclass of the SUT. |
Mock Object | Category: Test Double Patterns | 6 November 2006 |
Replace an object the system under test (SUT) depends on with a test-specific
object that verifies it is being used correctly by the SUT. |
Configurable Test Double | Category: Test Double Patterns | 6 November 2006 |
Configure a reusable Test Double with the values to be returned or verified
during the fixture setup phase of a test. |
Test Stub | Category: Test Double Patterns | 6 November 2006 |
We replace a real object with a test-specific object that feeds the desired
indirect inputs into the system under test. |
Fake Object | Category: Test Double Patterns | 10 October 2003 |
Replace a component that the SUT depends on with a much lighter-weight
implementation. |
Copyright © 2003-2008 Gerard Meszaros all rights reserved